Separate read-only cache and write-read cache in a memory sub-system

ABSTRACT

A determination can be made of a type of memory access workload for an application. A determination can be made whether the memory access workload for the application is associated with sequential read operations. The data associated with the application can be stored at one of a cache of a first type or another cache of a second type based on the determination of whether the memory workload for the application is associated with sequential read operations.

TECHNICAL FIELD

Embodiments of the disclosure relate generally to memory sub-systems,and more specifically, relate to separate read-only cache and write-readcache in a memory sub-system.

BACKGROUND

A memory sub-system can be a storage system, such as a solid-state drive(SSD), or a hard disk drive (HDD). A memory sub-system can be a memorymodule, such as a dual in-line memory module (DIMM), a small outlineDIMM (SO-DIMM), or a non-volatile dual in-line memory module (NVDIMM). Amemory sub-system can include one or more memory components that storedata. The memory components can be, for example, non-volatile memorycomponents and volatile memory components. In general, a host system canutilize a memory sub-system to store data at the memory components andto retrieve data from the memory components.

BRIEF DESCRIPTION OF THE DRAWINGS

The present disclosure will be understood more fully from the detaileddescription given below and from the accompanying drawings of variousembodiments of the disclosure.

FIG. 1 illustrates an example computing environment that includes amemory sub-system in accordance with some embodiments of the presentdisclosure.

FIG. 2 illustrates an example caching component and local memory of thememory sub-system in accordance with some embodiments of the presentdisclosure.

FIG. 3 is a flow diagram of an example method to use a separateread-only cache and write-read cache based on a determined memory accessworkload of an application in accordance with some embodiments of thepresent disclosure.

FIG. 4 is a flow diagram of an example method to use sectors havingfixed data sizes in a cache line to accumulate data in a cache inaccordance with some embodiments of the present disclosure.

FIG. 5 illustrates an example read-only cache and a write-read cache inaccordance with some embodiments of the present disclosure.

FIG. 6 is a flow diagram of an example method to store a read requestfor data that is not present in a cache in an outstanding command queuein accordance with some embodiments of the present disclosure.

FIG. 7 is a flow diagram of an example method to execute the requestsstored in an outstanding command queue in accordance with someembodiments of the present disclosure.

FIG. 8 illustrates an example read-only outstanding command queues,write-read outstanding command queues, a read-only content-addressablememory, and a read-only content-addressable memory in accordance withsome embodiments of the present disclosure.

FIG. 9 is a flow diagram of an example method to determine a schedule toexecute requests in a memory sub-system in accordance with someembodiments of the present disclosure.

FIG. 10 is a flow diagram of another example method to determine aschedule to execute requests in a memory sub-system in accordance withsome embodiments of the present disclosure.

FIG. 11 illustrates an example of using a priority scheduler todetermine a schedule to execute requests based on priority indicators inaccordance with some embodiments of the present disclosure.

FIG. 12 is a block diagram of an example computer system in whichembodiments of the present disclosure may operate.

DETAILED DESCRIPTION

Aspects of the present disclosure are directed to separate read-onlycache and write-read cache in a memory sub-system. A memory sub-systemis also hereinafter referred to as a “memory device.” An example of amemory sub-system is a storage device that is coupled to a centralprocessing unit (CPU) via a peripheral interconnect (e.g., aninput/output bus, a storage area network). Examples of storage devicesinclude a solid-state drive (SSD), a flash drive, a universal serial bus(USB) flash drive, and a hard disk drive (HDD). Another example of amemory sub-system is a memory module that is coupled to the CPU via amemory bus. Examples of memory modules include a dual in-line memorymodule (DIMM), a small outline DIMM (SO-DIMM), a non-volatile dualin-line memory module (NVDIMM), etc. In some embodiments, the memorysub-system can be a hybrid memory/storage sub-system. In general, a hostsystem can utilize a memory sub-system that includes one or more memorycomponents. The host system can provide data to be stored at the memorysub-system and can request data to be retrieved from the memorysub-system.

The memory sub-system can include multiple memory components that canstore data from the host system. In some host systems, the performanceof applications executing on the host system can highly depend on thespeed at which data can be accessed in a memory sub-system. Toaccelerate data access, conventional memory sub-systems use spatial andtemporal locality of memory access patterns to optimize performance.These memory sub-systems can use higher performance and lower capacitymedia, referred to as caches, to store data that is accessed frequently(temporal locality) or data located in a memory region that has recentlybeen accessed (spatial locality).

Each of the memory components can be associated with a protocol thatspecifies the size of a management unit used by the memory componentand/or the preferred sizes for requests to access data stored at themanagement unit. For example, a protocol for one memory component canspecify that 512 kilobyte (KB) size requests be performed on the memorycomponent. An application executing on a host system can initiallyrequest to read 512 KB of data from the memory component, but the 512 KBrequest is typically broken up into smaller granularity requests (e.g.,eight 64 KB requests) due to a protocol of a bus used to communicatebetween the host system and the memory sub-system. The conventionalmemory sub-system can perform the smaller granularity requests to obtainthe data from the memory component, which can then be stored in a cache,and/or returned to the requesting application. Executing the smallergranularity requests on a memory component that is capable of handlinglarger granularity requests can lead to faster wear of the memorycomponent and a lower endurance as more read operations will beperformed at the memory component.

Additionally, some applications that execute on a host system can use amemory sub-system as a main memory. In such an instance, the addressspace generally has separate memory address regions for reading data andwriting data. In conventional memory sub-systems, a single cache that iscapable of writing and reading data can be used, which may not bedesirable for different memory access workloads. For example, the readand write request latencies can be different and using a single cachecan decrease performance of the memory sub-system when an application iswriting and reading to different address spaces.

The different types of memory access workloads can be sequential(in-order) and random (out-of-order) accesses. For example, anapplication can request to read original data from an address, writedifferent data to the address, and read the different data from theaddress. If the requests are not handled in order properly, there can bedata hazards such as the memory sub-system returning the wrong data tothe application (e.g., returning the original data in response to a readrequest for the different data before the different data has beenwritten).

Further, in some instances, applications can request to access data atdifferent addresses. The data can be located at the same or differentmemory components. The latency with returning the data at differentaddresses from the same or different memory components can vary based onvarious factors, such as the speed of the memory component, the size ofthe data requested, and the like. A conventional memory sub-systemtypically waits until the data at the address of a request that wasreceived first is returned from the memory components withoutconsidering whether data at a different address of another request isreturned from the memory components faster. That is, the data at thedifferent address can sit idle after being returned from the memorycomponents until the data at the address of the request received firstis stored in a cache. This can reduce data throughput in the memorysub-system.

Aspects of the present disclosure address the above and otherdeficiencies by using a separate read-only cache and write-read cache ina memory sub-system. A separate read-only cache and write-read cache ina memory sub-system front-end can provide applications executing on hostsystems different spaces to read from and write to. For example,applications can request certain virtual addresses that are translatedto logical addresses by a host operating system. The logical address canbe translated to a physical address that can be maintained in differentspaces to read from and write to using the separate read-only cache andwrite-read cache. The separate read-only and write-read caches can belocated between the host system and the media components, also referredto as a “backing store,” of the memory sub-system. The read-only cachecan be used for sequential read requests for data in the memorycomponents and the write-read cache can be used to handle read and writerequests for data in the media components. The separate caches canimprove performance of the memory sub-system by reading/writing datafaster than accessing the slower backing store for every request.Further, the separate caches improve endurance of the backing store byreducing the number of requests to the backing store.

In some embodiments, a memory sub-system can detect a memory accessworkload, such as sequential memory access workloads or random memoryaccess workloads. Sequential memory access workloads can refer to readrequests occurring one after the other to the same or sequentialaddresses. The data requested in the sequential memory access workloadscan be populated in the read-only cache for faster access than using thebacking store every time.

Random memory access workloads can refer to writes and reads occurringrandomly. Certain applications can use random memory access workloads.The data associated with the random write and read requests can bepopulated in the write-read cache. For example, data requested to bewritten to the backing store can be initially written to the write-readcache, when the data is requested to be read, the write-read cache canreturn the written data without having to access the backing store.

Each of the read-only cache and the write-read cache can use arespective content-addressable memory (CAM) to determine if data that isassociated with requests received from the host system are present inthe read-only cache and/or the write-read cache. For example, the memorysub-system can use the CAMs to determine whether requested dataincluding tags are stored in the read-only and/or write-read caches. Adata request has an address specifying the location of the requesteddata. The address can be broken up into portions, such as an offset thatidentifies a particular location within a cache line, a set thatidentifies the set that contains the requested data, and a tag thatincludes one or more bits of the address that can be saved in each cacheline with its data to distinguish different addresses that can be placedin a set. The CAM corresponding to the read-only cache or the write-readcache that are to store the requested data can store the tag for therequested data to enable faster lookup than searching the cache itselfwhen the requests are received.

Further, as discussed above, the host system can provide a request fordata (e.g., 512 bytes) by breaking the request into small granularityrequests of 64 bytes based on the protocol used by a memory bus thatcommunicatively couples the host system to the memory sub-system. Insome embodiments, each of the read-only cache and the write-read cacheuse sectors to aggregate the smaller granularity requests to a largergranularity of the cache line (e.g., aggregates eight 64 bytes requeststo achieve the 512 byte cache line size). The sectors can have a fixedsize that is specified by a memory access protocol used by the hostsystem and the size of a management unit of the memory component in thebacking store that stores the data. For example, if the size of themanagement unit is 512 bytes in the memory component and the protocolspecifies using 64 byte requests, then the sectors can have a fixed datasize of 64 bytes and the cache line can include eight sectors to equalthe 512 bytes of the management unit. In some instances, the managementunit can be 128 bytes, for example, and just two sectors having a fixeddata size of 64 bytes can be used. The number of sectors of thewrite-read cache can be larger than the number of sectors for theread-only cache because it is desirable to perform fewer writes to thebacking store to improve endurance of the backing store. The memorysub-system can execute one request for 512 byte to the backing store,instead of eight 64 byte requests, to reduce the number of requests thatare made to the backing store having large management units in memorycomponents, thereby improving endurance of the memory components.

In some embodiments, the read-only cache and/or the write-read cache canbe preloaded with data prior to receiving memory access requests fromthe host system. For example, the read-only cache and/or the write-readcache can be preloaded during initialization of an application executingon the host system. A memory protocol can include semantics to enable anapplication to send preload instructions to the memory sub-system topreload the read-only cache and/or the write-read cache with desireddata. One or more read requests can be generated by the memorysub-system to obtain the data from the backing store. As describedbelow, outstanding command queues can be used to store the requests inthe order in which they are generated and priority scheduling can beperformed to determine a schedule of executing the requests. Filloperations can be generated to store the data obtained from the backingstore in one or more sectors of a cache line in the read-only cacheand/or the write-read cache. The applications can send the preloadinstructions based on the data that the applications typically useduring execution or the data that the application plans to use.

Further, outstanding command queues can be used to store read requestsand write requests to prevent data hazards and enhance the quality ofservice of accessing data in the memory sub-system. The outstandingcommand queues can improve request traffic throughput based on differenttypes of traffic in the memory sub-system. For example, the memorysub-system can use control logic and the outstanding command queues toprovide in-order accesses for data requested at the same cache line andout-of-order accesses to data requested at different cache lines. Aseparate outstanding command queue can be used for the read-only cacheand the write-read cache. Each cache line of the read-only outstandingcommand queue can correspond to a respective cache line in the read-onlycache, and each cache line of the write-read outstanding command queuecan correspond to a respective cache line in the write-read cache. Therecan be a fewer number of queues in each of the outstanding commandqueues than the number of cache lines in the read-only cache and thewrite-read cache.

In general, requests can be received from the host system. Both aread-only content addressable memory (CAM) and a write-read CAM can besearched to determine if a matching tag associated with an addressincluded in the request is present in the CAMs. If a matching tag isfound, the data can be returned from the corresponding cache line for aread request or the data can be written to the cache line for a writerequest. If the matching tag is not found in either CAM, the read-onlyoutstanding command queue and the write-read outstanding command queuecan be searched for the matching tag. If the matching tag is found ineither of the outstanding command queues, then there are pendingrequests for the cache line assigned to the tag and the received requestis stored in the queue behind the other requests for the data at theaddress. If the matching tag is not found in either of the outstandingcommand queues, a queue can be selected as the desired outstandingcommand queue and the tag of the request can be assigned to the selectedoutstanding command queue. Further, the memory sub-system can set ablock bit to block the selected outstanding command queue and store therequest in the selected outstanding command queue. The requests canprocess in the order in which the requests are received in the samequeue. There can be out-of-order access to the different cache linesbased on when requests are received and by using the block bit to blockand unblock different outstanding command queues assigned to thedifferent cache lines, as described in further detail below.

In some embodiments, to further improve performance and quality ofservice of the memory sub-system, a priority scheduler can be used witha priority queue to determine a schedule of when to execute requests andfill operations. As described above, the outstanding command queues canqueue misses for read requests for data and misses for write requestsfor data in the caches. A priority scheduler can determine a schedule ofwhen to execute the requests based on when the requests are received.The priority scheduler can generate and assign priority indicators(e.g., tokens having a priority value) to the requests to maintain theorder for the requests and the fill operations that are generated tostore the data obtained from the backing store at cache lines of thecache.

For example, for read request misses, the priority scheduler cangenerate a priority indicator having a higher priority value for a filloperation associated with the particular read request that can beassigned when the data associated with the particular read request isobtained from the backing store. When the requests are stored in theoutstanding command queues and the schedule for execution is determined,the priority scheduler can relay the requests to be stored in thepriority queue. The requests can be processed in the order in which theyare stored in the priority queue to obtain data associated with therequests from the backing store or write data associated with therequests to the backing store. The data that is returned from thebacking store can be stored in a fill queue with a fill operation thatis assigned a priority indicator. The priority indicators can specify toperform fill operations in the fill queue first and can be used toregulate the processing of the requests through the outstanding commandqueues.

As described further below, there are certain instances when requestsfor data stored at different cache lines can be executed out of order.That is, one request to read data can be executed from the outstandingcommand queue but another request in the same outstanding command queuefor the same data can be blocked to allow execution of yet anotherrequest in a different outstanding command queue. In such instances, therequests can be executed out of order based on the priority indicatorsthat are assigned to the requests and the fill operations associatedwith the requests. Performing the requests out of order between theoutstanding command queues can be done to prevent applications fromhaving to wait on data that is obtained from the backing store. Such atechnique can improve the quality of service of returning data to thehost system, thereby improving performance of the memory sub-system.

Advantages of the present disclosure include, but are not limited to,improved endurance of the memory components by using sectored cachelines to accumulate requests so that the number of requests performed onthe memory components can be reduced. Also, using separate read-only andwrite-read caches can provide separate spaces for reading data from andwriting data to for applications executing on the host system. Theseparate spaces can improve performance of accessing data for theapplications by detecting the type of memory access workload used by theapplications and selecting an appropriate cache to fulfill the memoryaccesses for the applications. Additionally, the quality of service andperformance of the memory sub-system can be improved by using theoutstanding command queues and priority scheduler to determine aschedule of executing the requests.

FIG. 1 illustrates an example computing environment 100 that includes amemory sub-system 110 in accordance with some embodiments of the presentdisclosure. The memory sub-system 110 can include media, such as memorycomponents 112A to 112N. The memory components 112A to 112N can bevolatile memory components, non-volatile memory components, or acombination of such. In some embodiments, the memory sub-system is astorage system. An example of a storage system is a SSD. In someembodiments, the memory sub-system 110 is a hybrid memory/storagesub-system. In general, the computing environment 100 can include a hostsystem 120 that uses the memory sub-system 110. For example, the hostsystem 120 can write data to the memory sub-system 110 and read datafrom the memory sub-system 110.

The host system 120 can be a computing device such as a desktopcomputer, laptop computer, network server, mobile device, or suchcomputing device that includes a memory and a processing device. Thehost system 120 can include or be coupled to the memory sub-system 110so that the host system 120 can read data from or write data to thememory sub-system 110. The host system 120 can be coupled to the memorysub-system 110 via a physical host interface. As used herein, “coupledto” generally refers to a connection between components, which can be anindirect communicative connection or direct communicative connection(e.g., without intervening components), whether wired or wireless,including connections such as electrical, optical, magnetic, etc.Examples of a physical host interface include, but are not limited to, aserial advanced technology attachment (SATA) interface, a peripheralcomponent interconnect express (PCIe) interface, universal serial bus(USB) interface, Fibre Channel, Serial Attached SCSI (SAS), etc. Thephysical host interface can be used to transmit data between the hostsystem 120 and the memory sub-system 110. The host system 120 canfurther utilize an NVM Express (NVMe) interface to access the memorycomponents 112A to 112N when the memory sub-system 110 is coupled withthe host system 120 by the PCIe interface. The physical host interfacecan provide an interface for passing control, address, data, and othersignals between the memory sub-system 110 and the host system 120.

The memory components 112A to 112N can include any combination of thedifferent types of non-volatile memory components and/or volatile memorycomponents. An example of non-volatile memory components includes anegative-and (NAND) type flash memory. Each of the memory components112A to 112N can include one or more arrays of memory cells such assingle level cells (SLCs) or multi-level cells (MLCs) (e.g., triplelevel cells (TLCs) or quad-level cells (QLCs)). In some embodiments, aparticular memory component can include both an SLC portion and a MLCportion of memory cells. Each of the memory cells can store one or morebits of data (e.g., data blocks) used by the host system 120. Althoughnon-volatile memory components such as NAND type flash memory aredescribed, the memory components 112A to 112N can be based on any othertype of memory such as a volatile memory. In some embodiments, thememory components 112A to 112N can be, but are not limited to, randomaccess memory (RAM), read-only memory (ROM), dynamic random accessmemory (DRAM), synchronous dynamic random access memory (SDRAM), phasechange memory (PCM), magneto random access memory (MRAM), negative-or(NOR) flash memory, electrically erasable programmable read-only memory(EEPROM), and a cross-point array of non-volatile memory cells. Across-point array of non-volatile memory can perform bit storage basedon a change of bulk resistance, in conjunction with a stackablecross-gridded data access array. Additionally, in contrast to manyflash-based memories, cross-point non-volatile memory can perform awrite in-place operation, where a non-volatile memory cell can beprogrammed without the non-volatile memory cell being previously erased.Furthermore, the memory cells of the memory components 112A to 112N canbe grouped as memory pages or data blocks that can refer to a unit ofthe memory component used to store data.

The memory system controller 115 (hereinafter referred to as“controller”) can communicate with the memory components 112A to 112N toperform operations such as reading data, writing data, or erasing dataat the memory components 112A to 112N and other such operations. Thecontroller 115 can include hardware such as one or more integratedcircuits and/or discrete components, a buffer memory, or a combinationthereof. The controller 115 can be a microcontroller, special purposelogic circuitry (e.g., a field programmable gate array (FPGA), anapplication specific integrated circuit (ASIC), etc.), or other suitableprocessor. The controller 115 can include a processor (processingdevice) 117 configured to execute instructions stored in local memory119. In the illustrated example, the local memory 119 of the controller115 includes an embedded memory configured to store instructions forperforming various processes, operations, logic flows, and routines thatcontrol operation of the memory sub-system 110, including handlingcommunications between the memory sub-system 110 and the host system120. In some embodiments, the local memory 119 can include memoryregisters storing memory pointers, fetched data, etc. The local memory119 can also include read-only memory (ROM) for storing micro-code.While the example memory sub-system 110 in FIG. 1 has been illustratedas including the controller 115, in another embodiment of the presentdisclosure, a memory sub-system 110 may not include a controller 115,and may instead rely upon external control (e.g., provided by anexternal host, or by a processor or controller separate from the memorysub-system).

In general, the controller 115 can receive commands or operations fromthe host system 120 and can convert the commands or operations intoinstructions or appropriate commands to achieve the desired access tothe memory components 112A to 112N. The controller 115 can beresponsible for other operations such as wear leveling operations,garbage collection operations, error detection and error-correcting code(ECC) operations, encryption operations, caching operations, and addresstranslations between a logical block address and a physical blockaddress that are associated with the memory components 112A to 112N. Thecontroller 115 can further include host interface circuitry tocommunicate with the host system 120 via the physical host interface.The host interface circuitry can convert the commands received from thehost system into command instructions to access the memory components112A to 112N as well as convert responses associated with the memorycomponents 112A to 112N into information for the host system 120.

The memory sub-system 110 can also include additional circuitry orcomponents that are not illustrated. In some embodiments, the memorysub-system 110 can include a cache or buffer (e.g., DRAM) and addresscircuitry (e.g., a row decoder and a column decoder) that can receive anaddress from the controller 115 and decode the address to access thememory components 112A to 112N.

The memory sub-system 110 includes a caching component 113 that can usea separate read-only cache and write-read cache in a memory sub-system.In some embodiments, the controller 115 includes at least a portion ofthe caching component 113. For example, the controller 115 can include aprocessor 117 (processing device) configured to execute instructionsstored in local memory 119 for performing the operations describedherein. In some embodiments, the caching component 113 is part of thehost system 110, an application, or an operating system.

The caching component 113 can use a separate read-only cache andwrite-read cache in the memory sub-system 110. The read-only cache canbe used for sequential read requests for data in the memory componentsand the write-read cache can be used to handle read and write requestsfor data in the media components. The separate caches can improveperformance of the memory sub-system by reading/writing data faster thanaccessing the slower backing store every time. Further, the separatecaches improve endurance of the backing store by reducing the number ofrequests to the backing store by using sectors in cache lines. In someembodiments, the caching component 113 can detect a memory accessworkload, such as sequential memory access workloads or random memoryaccess workloads. The data requested in the sequential memory accessworkloads can be populated in the read-only cache for faster access thanusing the backing store every time. The data associated with the randomwrite and read requests can be populated in the write-read cache. Insome embodiments, the caching component 113 can receive preloadinstructions from one or more applications executing on the host system120 and preload the read-only cache and/or the write-read cache toimprove quality of service.

Further, the caching component 113 can use outstanding command queues tostore read requests and write requests to prevent data hazards andenhance the quality of service of accessing data in the memorysub-system. The outstanding command queues can improve request trafficthroughput based on different types of traffic in memory sub-systems.The controller can use control logic and the outstanding command queuesto provide in-order accesses for data requested at the same cache lineand out-of-order accesses to data requested at different cache lines.

In some embodiments, to further improve performance and quality ofservice of the memory sub-system, the caching component 113 can use apriority scheduler with a priority queue to determine a schedule of whento execute requests and fill operations. As described above, theoutstanding command queues can queue misses for read requests for dataand misses for write requests for data in the caches. A priorityscheduler can determine a schedule of when to execute the requests basedon when the requests are received. The priority scheduler can generateand assign priority indicators (e.g., tokens having a priority value) tothe requests to maintain the order for the requests and the filloperations that are generated to store the data obtained from thebacking store at cache lines of the cache.

FIG. 2 illustrates an example caching component 113 and local memory 119of the memory sub-system 110 in accordance with some embodiments of thepresent disclosure. As depicted, the local memory 119 can include aseparate read-only cache 200 and a write-read cache 202. The cachingcomponent 113 can include a read-only content-addressable memory (CAM)204 for the read-only cache 200, a write-read CAM 206 for the write-readcache 202, read-only outstanding command queues 208, and a write-readoutstanding command queues 210. The read-only outstanding command queues208 and the write-read outstanding command queues 210 can be first-in,first-out (FIFO) queues. The structure and contents of the read-only CAM204, the write-read CAM 206, the read-only outstanding command queues208, and the write-read outstanding command queues 210 is discussedfurther below. The caching component 113 also includes a priorityscheduler 212 that determines a schedule for executing requests and/orfill operations using priority indicators (e.g., numerical tokens). Thecaching component 113 can include a state machine that also determinesthe number of read requests that are needed for a size of the cache lineof the read-only cache 200 or write-read cache 202 that is to be filledwith data from the backing store. The priority scheduler 212 can alsoinclude arbitration logic that determines the order in which requestsand/or fill operations are to execute. The arbitration logic can specifyscheduling requests and/or fill operations in the order in which theoperations are received. One purpose of the arbitration logic can be tonot keep applications waiting if the data is obtained in the cachingcomponent 113 from the backing store. As such, the priority scheduler212 can assign a higher priority to fill operations and data. Additionalfunctionality of the priority scheduler 212 is discussed below.

The caching component 113 also includes various queues that are used fordifferent purposes. The queues can be first-in, first-out (FIFO) queues.As such, the queues can be used to process requests, operations, and/ordata in the order in which the requests, operations, and/or data arereceived and stored in the various queues. The caching component 113 caninclude a fill queue 214, a hit queue 216, an evict queue 218, apriority queue 220, and a pend queue 222. The fill queue 214 can storedata obtained from the backing store and fill operations generated forthe data. The fill operations can be generated when a read request isreceived and the requested data is not found (cache miss) in eitherread-only cache 200 or write-read cache 202. The hit queue 216 can storethe requests for data that is found (cache hit) in the read-only cache200 or the write-read cache 202.

The evict queue 218 can be used to evict data from the read-only cache200 and/or the write-read cache 202 as desired. For example, when theread-only cache 200 and/or the write-read cache 202 are full (everycache line includes at least some valid data in one or more sectors), aneviction policy such as least recently used can be used to select thecache line with data that is least recently used to evict. The data ofthe selected cache line can be read out of the read-only cache 200and/or write-read cache 202 and stored in the evict queue 218. Theselected cache line can then be invalidated by setting a valid bit to aninvalid state. The invalid cache line can be used to store subsequentdata.

The priority queue 220 can store requests to execute on the backingstore. The priority scheduler 212 can assign priority indicators to eachrequest that is received and/or fill operation that is generated for therequests when the requests are received. The priority scheduler 212 canuse the priority indicators to determine a schedule of executing therequests and/or fill operations. Based on the determined schedule, thepriority scheduler 212 stores the request in the priority queue 220 tobe executed no the backing store in the order the requests are stored inthe priority queue 220. The pend queue 222 can store requests that arereceived for data not found in the caches 200 and 202 when there are noavailable read-only outstanding command queues 208 or write-readoutstanding command queues 210 available.

The read-only cache 200 and write-read cache 202 included in the localmemory 119 can provide faster access to data stored in the slower memorycomponents of the backing store. The read-only cache 200 and write-readcache 202 can be high-performance, lower-capacity media that store datathat is accessed frequently (temporal locality) by applications of thehost system 120 or data located in a memory region that has recentlybeen accessed (spatial locality). An application binary or pagedsoftware system using the memory sub-system as the address space canhave separate memory address regions for reading data from and writingdata to by using the read-only cache 200 and the write-read cache 202.There can be numerous cache lines in each of the read-only cache 200 andthe write-read cache 202. Each cache line can include one or moresectors that have a fixed size, as discussed further below.

For a read request, the caching component 113 searches the read-only CAM204 and write-read CAM 206 to determine if a matching tag is found.Finding a matching tag indicates that the data is stored at a cache lineof the read-only cache 200 or the write-read cache 202 depending atwhich CAM 204 or 206 the matching tag is found. If there is a hit,meaning that the matching tag is found in one of the CAMs 204 or 206,then the request is executed relatively quickly as compared to accessingthe backing store. If there is a miss, meaning that the matching tag isnot found in one of the CAMs 204 or 206, then the read-only outstandingcommand queues 208 and the write-read outstanding command queues 210 aresearched for the matching tag. If there is a hit, and the matching tagis found in one of the outstanding command queues 208 or 210, then therequest is stored in the outstanding command queue that is assigned thematching tag. If there is a miss in the outstanding command queues 208and 210, then one of the outstanding command queues 208 or 210 can beselected and assigned the tag included in the address of the request.The outstanding command queues 208 and 210 can prevent data hazards byenabling processing of requests in the order in which the requests arereceived for a cache line. Further, the outstanding command queues 208and 210 can improve quality of service and performance by enablingperforming requests out of order for different cache lines when data isobtained faster for a request received subsequent to a first request.

A read-only outstanding command queue 208 or a write-read outstandingcommand queue 210 can be selected based on the type of memory accessworkload currently used by the application or based on the type ofrequest. For example, if the memory access workload is sequential, thena read-only outstanding command queue can be selected. If the memoryaccess workload is random, then a write-read outstanding command queuecan be selected. If the request is to write data, then a write-readoutstanding command queue can be selected. In any instance, anoutstanding command queue that has a valid bit set to an invalid statecan be selected and the tag of the request can be assigned to theselected outstanding command queue 208 or 210. Each queue in theoutstanding command queues 208 and 210 can correspond to a single cacheline in either of the caches 200 or 202 at a given time. The valid bitfor the selected queue in the outstanding command queues 208 or 210 canbe set to a valid state when the tag is assigned. If every outstandingcommand queue is being used as indicated by having a valid bit set to avalid state, then the request can be stored in the pend queue 222 untilan outstanding command queue in the read-only outstanding command queues208 or the write-read outstanding command queues 210 becomes invalid.

For a write request, the caching component 113 can search the read-onlyCAM 204 and invalidate the cache line if the cache line includes datafor the address being requested. The caching component 113 can identifyan empty, invalid cache line in the write-read cache using thewrite-read CAM 206. The data can be written to the selected cache linein the write-read cache 202. A dirty bit in the write-read CAM 206 canbe set for the cache line to indicate that data is written to that cacheline. The writing of data to the cache can be performed faster thanwriting the data to the slower backing store. Subsequent write requestscan write data to the same or different cache lines and the dirty bitcan be set in the write-read CAM 206 for the cache line at which thesubsequent write request is performed. Further, the subsequent dataassociated with the write request can be made invalid if found in theread-only cache 200. During operation, when is the memory sub-systemdetermines to flush either of the caches 200 or 202, the dirty cachelines can be identified and queued to the evict queue 218 to be sent tothe backing store.

FIG. 3 is a flow diagram of an example method 300 to use a separateread-only cache and write-read cache based on a determined memory accessworkload of an application in accordance with some embodiments of thepresent disclosure. The method 300 can be performed by processing logicthat can include hardware (e.g., processing device, circuitry, dedicatedlogic, programmable logic, microcode, hardware of a device, integratedcircuit, etc.), software (e.g., instructions run or executed on aprocessing device), or a combination thereof. In some embodiments, themethod 300 is performed by the caching component 113 of FIG. 1. Althoughshown in a particular sequence or order, unless otherwise specified, theorder of the processes can be modified. Thus, the illustratedembodiments should be understood only as examples, and the illustratedprocesses can be performed in a different order, and some processes canbe performed in parallel. Additionally, one or more processes can beomitted in various embodiments. Thus, not all processes are required inevery embodiment. Other process flows are possible.

At operation 310, the processing device determines a memory accessworkload for an application. The processing device can determine thememory access workload for the application by receiving a set of memoryaccess requests from the application, determining a pattern based on theset of memory access requests, and determining the memory accessworkload for the application based on the pattern. For example, if thesame or sequential addresses in a similar address region are beingrequested to be read, the processing device can determine that thememory access workload is sequential and the read-only cache should beused to store the data associated with the request. Further, if thepattern is indicative of sequential read requests or operations beingreceived one after the other, then the processing device can determinethat the memory access workload is sequential and the read-only cacheshould be used to store the data associated with the request. If thepattern indicates that random read requests and write requests are beingreceived from the application, then the processing device can determinethat the memory access workload is random for the application and thewrite-read cache should be used to store the data associated with therequest. In some embodiments, the write-read cache is used to store dataassociated with any write requests.

At operation 320, the processing device determines whether the memoryaccess workload for the application is associated with sequential readoperations. For example, a determination can be made as to whether thememory access workload for the application is sequential or random asdescribed above. At operation 330, the processing device stores dataassociated with the application at one of a cache of a first type(read-only) or another cache of a second type (write-read) based on thedetermination of whether the memory workload for the application isassociated with sequential read operations. The processing device storesthe data associated with the application at the cache of the first typewhen the memory access workload is associated with sequential readoperations. In some embodiments, if the processing device determinesthat the memory access workload is associated with write and readoperations, then the processing device can store the data associatedwith the application at the cache of the second type.

The processing device can determine if the data is present in either theread-only cache or the write-read cache by searching the respectiveread-only CAM and write-read CAM. If the data is present in a cache lineof either cache, the read request can be executed and the data can bereturned to the application. If the data is not present, the read-onlyoutstanding command queue and the write-read outstanding command queuecan be searched for the tag associated with the address of the requesteddata. If the matching tag is not found in the read-only outstandingcommand queues, the read request can be stored in a queue of theread-only outstanding command queue and executed to obtain the dataassociated with the request from the backing store. If the matching tagis found in a read-only outstanding command queue, then one or morerequests for the cache line are stored in the outstanding command queueand the current request is stored behind the other requests in theread-only outstanding command. The current request will be executedafter the other requests for the particular cache line based on aschedule determined by the priority scheduler. Further details withrespect to the operation of the outstanding command queues and thepriority scheduler are discussed below.

In some embodiments, the processing device can receive the dataassociated with the application in one or more requests to write thedata to a memory component. The one or more write requests can have afixed data size. The fixed data size is specified by a memory semanticof the protocol used to communicate between the host system and thememory sub-system via a bus. The processing device can store the dataassociated with the application at one or more sectors of a cache lineof the cache of the second type to accumulate data in the cache linebased on a determination of whether the memory access workload for theapplication is associated with write and read operations. Each of theone or more sectors have the fixed data size. The processing device candetermine when a cumulative data size of the one or more sectors storingthe data associated with the application satisfies a thresholdcondition. Responsive to determining that the cumulative data size ofthe one or more sectors storing the data associated with the applicationsatisfies the threshold condition, the processing device can transmit arequest to store the cumulative data at the memory component. A writerequest can be sent to the backing store to write the accumulated datain the cache line when each sector in the cache line includes validdata. In this way, instead of issuing eight write requests to thebacking store, just one write request for the cache line can be issuedto the backing store. Using this technique can improve the endurance ofthe memory components in the backing store by performing fewer writeoperations.

Further, read requests can also be received from an application and theread requests can each have the fixed data size. The cache lines in theread-only memory can be broken up into one or more sectors that eachhave the fixed data size. When data requested to be read is alreadypresent in either of the read-only cache or the write-read cache, theread request can be performed to read the data from the appropriatecache line storing the requested data. When there is a cache miss andneither the read-only cache nor the write-read cache stores therequested data, the read requests can be processed using the outstandingcommand queues. The priority scheduler can determine a number of readrequests to perform based on the size (e.g., two 64 byte sectors) of thecache line. For example, if just one read request for 64 bytes isreceived, and the cache line size is 128 bytes, the priority schedulercan determine that two read requests for 64 bytes (128 bytes total) areto be performed to return the full data to store in the cache lineassociated with the request.

In some embodiments, the processing device can receive a command orinstruction from an application to preload the read-only cache or thewrite-read cache with the data associated with the application. Suchdata can be data that is to be used by or operated on by theapplication. The processing device can preload the read-only cache orthe write-read cache with the data associated with the applicationbefore any requests to access the data are received from theapplication. The instruction can be associated with the memory semanticused in the protocol to communicate between the host system and thememory sub-system. To process the preload instruction, the processingdevice can generate a suitable number of read requests for the datausing a state machine in the priority scheduler. The processing devicecan store the generated read requests in the read-only outstandingcommand queue or the write-read outstanding command queue to be executedon the backing store. When the data associated with the read requests isobtained from the backing store, the data can be stored in one or morecache lines of the read-only cache or the write-read cache.

FIG. 4 is a flow diagram of an example method 400 to use sectors havingfixed data sizes in a cache line to accumulate data in a cache inaccordance with some embodiments of the present disclosure. The method400 can be performed by processing logic that can include hardware(e.g., processing device, circuitry, dedicated logic, programmablelogic, microcode, hardware of a device, integrated circuit, etc.),software (e.g., instructions run or executed on a processing device), ora combination thereof. In some embodiments, the method 400 is performedby the caching component 113 of FIG. 1. Although shown in a particularsequence or order, unless otherwise specified, the order of theprocesses can be modified. Thus, the illustrated embodiments should beunderstood only as examples, and the illustrated processes can beperformed in a different order, and some processes can be performed inparallel. Additionally, one or more processes can be omitted in variousembodiments. Thus, not all processes are required in every embodiment.Other process flows are possible.

At operation 410, the processing device receives a set of requests toaccess data at a memory component. Each of the requests can specify afixed size of data. The fixed size of data is specified by a memoryaccess protocol used by the host system to interface with the memorysub-system including one or more memory components in the backing store.The requests can be to write data to the backing store.

At operation 420, the processing device stores data of each of requestsinto a respective sector of a set of sectors of a cache line of a cacheto accumulate data in the cache line. Each respective sector of the setof sectors of the cache line stores cache data at the fixed size. Theparticular cache line that is selected can be in a write-read cache andcan be selected by identifying a cache line that is invalid. In otherwords, a cache line that does not have any sectors including valid bitsset or dirty bits set can be selected initially to store the data of afirst request. The first write request can be stored in the write-readoutstanding command queue and the tag of the write request can beassigned to one of the outstanding command queues. The outstandingcommand queue selected can correspond to a cache line at which the datawill be written. The processing device can execute the write request inthe outstanding command queue to write the data to a sector of thecorresponding cache line. Further an entry in the write-read CAM can becreated with the tag of the write request. Subsequent requests to writedata with a matching tag that is found in the write-read CAM can bestored in the hit queue and then executed to write the data in othersectors. Whenever a sector is written to, the valid bit of the sectorcan be set to a state indicating valid data is stored. Further, thedirty bit of the sector can be set indicating that data is being writtento that sector.

At operation 430, the processing device determines when a cumulativedata size of the set of sectors storing data for each of the requestssatisfies a threshold condition. The threshold condition can include thecumulative data size satisfying a data size parameter specified foraccessing the memory component. For example, a data size parameter fordata access requests for a memory component can be set to largergranularities than the data size of the requests received from the host.In one example, the data size parameter can be 512 bytes and the datasize of the sectors can be 64 bytes. The threshold condition can besatisfied when 512 bytes of data are accumulated in eight sectors in acache line.

At operation 440, responsive to determining that the cumulative datasize of the set of sectors satisfies the threshold condition, theprocessing device transmits a request to store the accumulated data atthe memory component. The data can remain in the cache line in case theapplication seeks to quickly access the data. For example, theapplication can read the data out of the cache line of the write-readcache.

In some embodiments, the processing device can receive a command orinstruction to preload data in the cache (e.g., the read-only cacheand/or the write-read cache) with other data associated with theapplication. The processing device can preload the cache with the otherdata associated with the application prior to receiving the plurality ofrequests to access the data the memory component. The application cansend the instructions to the memory sub-system if the applicationdetermines that the data is going to be used frequently by theapplication.

FIG. 5 illustrates an example read-only cache 200 and a write-read cache202 in accordance with some embodiments of the present disclosure. Theseparate read-only cache 200 and the write-read cache 202 can provideseparate address spaces for applications or paged systems to read datafrom and write data to, which can improve performance of the memorysub-system. The read-only cache 200 and the write-read cache 202 includenumerous cache lines 500 and 504, respectively. Although just four cachelines are depicted in each of the caches 200 and 202, it should beunderstood that there can be many more cache lines included (e.g.,hundreds, thousands, etc.). A total size of each of the caches 200 and202 can be any suitable amount, such as 32 kilobytes.

As depicted, a cache line 500 in the read-only cache 200 includes twosectors 502. Each of the sectors has a fixed size that can be equal tothe data size of the requests that are sent from the host system. Thedata size of the requests can be specified by memory semantics of theprotocol used to interface via the bus between the host system and thememory sub-system. In one example, the sectors can each be 64 bytes anda total data size of the cache line 500 can be 128 bytes. Further, acache line 504 in the write-read cache 202 includes more sectors 506than the read-only cache 200 because it is desirable to perform writeoperations on the backing store less often than read operations toimprove the endurance of the memory components in the backing store. Inthe depicted example, the write-read cache 202 includes eight sectorsthat also have the fixed data size (e.g., 64 bytes). The fixed data sizecan also be equal to the data size of the requests received from thehost system. In one example, the fixed data size of each sector of acache line 504 in the write-read cache 202 can be 64 bytes. Thewrite-read cache 202 can accumulate data for eight write requests untila cumulative data size for the eight sectors 506 satisfies a thresholdcondition. The threshold condition can be that the cumulative data sizesatisfies a data size parameter specified for accessing the memorycomponent. The data size parameter can be a data size of a managementunit of the memory component, for example 512 bytes. Responsive todetermining that the cumulative data size of the set of sectors 506 ofthe cache line 504 storing each of the data of the requests satisfiesthe threshold condition, the caching component can transmit a writerequest to store the cumulative data at the backing store.

FIG. 6 is a flow diagram of an example method 600 to store a readrequest for data that is not present in a cache in an outstandingcommand queue in accordance with some embodiments of the presentdisclosure. The method 600 can be performed by processing logic that caninclude hardware (e.g., processing device, circuitry, dedicated logic,programmable logic, microcode, hardware of a device, integrated circuit,etc.), software (e.g., instructions run or executed on a processingdevice), or a combination thereof. In some embodiments, the method 600is performed by the caching component 113 of FIG. 1. Although shown in aparticular sequence or order, unless otherwise specified, the order ofthe processes can be modified. Thus, the illustrated embodiments shouldbe understood only as examples, and the illustrated processes can beperformed in a different order, and some processes can be performed inparallel. Additionally, one or more processes can be omitted in variousembodiments. Thus, not all processes are required in every embodiment.Other process flows are possible.

At operation 610, the processing device receives a request to read datastored at a memory sub-system. The request to read data can be sent froman application executing on the host system. The request can include anaddress from which to read the data in the memory sub-system. Anidentifier, referred to as a “tag”, can be extracted from the address.The tag can be a subset of bits of the address that can be used toidentify the location of the data at the address in the memorysub-system.

At operation 620, the processing device determines whether the data isstored at a cache of the memory sub-system. In some embodiments, theprocessing device searches for the tag associated with the requesteddata in a read-only CAM and a write-read CAM. The read-only CAM and thewrite-read CAM can include tags corresponding to the data stored atevery cache line in the respective CAM. The processing device can use acomparator in each of the read-only CAM and the write-read CAM todetermine whether a matching tag is found for the requested address fromwhich to read data. Determining whether the data is stored in the cachecan include determining whether a valid bit is set to a valid state forthe data in the CAM in which the matching tag is found. Responsive todetermining that the data is stored at the cache of the memorysub-system, the processing device can store the request at another queue(e.g., a hit queue) used to manage execution of requests for data thatis present in the cache.

At operation 630, responsive to determining that the data is not storedat the cache of the memory sub-system, the processing device determinesa queue of a set of queues to store the request with other read requestsfor the data stored at the memory sub-system. In some embodiments, thecache can refer to the read-only cache or the write-read cache. The setof queues can include the read-only outstanding command queue or thewrite-read outstanding command queue depending on which cache isselected to service the request. These queues can be used to store cachemisses (e.g., read misses and write misses). As discussed above, thememory access workload can dictate which cache to use to service therequest. If the memory access workload includes sequential readoperations, then the read-only cache and the read-only outstandingcommand queues can be used to service the request. If the memory accessworkload includes random read and write operations, then the write-readcache and the write-read outstanding command queues can be used toservice the request.

The processing device can determine the queue by determining if anyqueue in the set of queues are associated with the identifier of therequest. The processing device can search the read-only outstandingcommand queue and the write-read outstanding command queue for a queuethat is assigned the identifier of the request. If there are no queuesassigned the identifier, the processing device can select a queue thathas a valid bit set to an invalid state and/or a block bit set to anunblocked state from the appropriate set of queues. The processingdevice can store the request in the queue in the invalid state, assignthe tag to the queue, set the valid bit to a valid state, and set theblock bit to a blocked state. If every queue in the appropriate set ofqueues is being used (have valid bits set to valid state and block bitset to blocked state), then the request is stored in a pend queue untila queue becomes invalid in the appropriate set of queues.

If one of the queues in the set of queues is assigned the identifier andis valid, then there are other requests that have been received for thesame address that are already stored in the queue. At operation 640, theprocessing device stores the request at the determined queue with theother read requests for the data stored at the memory sub-system. Eachqueue of the set of queues corresponds to a respective cache line of thecache. The queue corresponds to the respective cache line by assigningthe tag of the request to the queue and also to an entry in theappropriate CAM that corresponds to the cache line storing the data ofthe request in the appropriate cache.

The request can be assigned a priority indicator and relayed to apriority queue by a priority scheduler when the request is stored in thequeue, as discussed further below. The priority scheduler can determinea number of requests to generate for the request based on size of thecache line. For example, if the request is for 64 bytes but the cacheline size is 128 bytes, then the priority scheduler can determine togenerate two requests of 64 bytes to read data out of the backing storeto fill the entire cache line with valid data. The priority schedulercan increment a read counter and a fill counter when the request isstored in the priority queue. The requests can be executed on thebacking store to obtain the desired data and the read counter can bedecremented.

The data obtained from the backing store can be stored in another queue(fill queue) with a fill operation. The processing device can assign thefill operation a priority indicator and execute the fill operation tostore the data to the appropriate cache line in the cache. Theprocessing device can set the block bit for the queue storing therequests to unblocked state and can decrement the fill counter. A CAMentry can be generated for the cache line storing the data and the tagcan be assigned to the CAM entry. The processing device can execute therequests in the queue to either read the data from the cache line orwrite the data to the cache line. Further, after the requests in thequeue are executed, the processing device can invalidate the queue bysetting the valid bit to an invalid state and un-assigning the tag. Thequeue can then be reused for the same or another cache line based onsubsequent requests that are received.

In some embodiments, the processing device can receive a write requestto write data to the backing store. The processing device can obtain atag from the request and search the write-read CAM and the write-readoutstanding command queues for the tag. If a matching tag is found inthe write-read CAM, then the data in the request is written into thecache line corresponding to the tag. The processing device can selectone or more invalid sectors in the cache line to which to write thedata. When the data is written into the one or more sectors, the validbits and dirty bits of the one or more sectors can be set by theprocessing device in the write-read CAM entry corresponding to the cacheline including the one or more sectors.

If a matching tag is not found in the write-read CAM but is found in awrite-read outstanding command queue, then other requests including thetag are stored in the identified queue that is assigned the matchingtag. The processing device can store the write request in the queueassigned the matching tag and the request can be processed similar inthe order in which it is received to write the data to one or moresectors of the corresponding cache line in the write-read cache. Forexample, the priority scheduler can generate a priority indicator forthe write request and assign the priority indicator to the writerequest. The priority scheduler can store the write request in thepriority queue, and the write request can be executed when it reachesthe front of the queue to write the data to the cache line. Storing thewrite request in the outstanding command queue can prevent data hazardsfrom occurring by not allowing the write request to execute before otherrequests that were received before the write request.

FIG. 7 is a flow diagram of an example method 700 to execute therequests stored in an outstanding command queue in accordance with someembodiments of the present disclosure. The method 700 can be performedby processing logic that can include hardware (e.g., processing device,circuitry, dedicated logic, programmable logic, microcode, hardware of adevice, integrated circuit, etc.), software (e.g., instructions run orexecuted on a processing device), or a combination thereof. In someembodiments, the method 700 is performed by the caching component 113 ofFIG. 1. Although shown in a particular sequence or order, unlessotherwise specified, the order of the processes can be modified. Thus,the illustrated embodiments should be understood only as examples, andthe illustrated processes can be performed in a different order, andsome processes can be performed in parallel. Additionally, one or moreprocesses can be omitted in various embodiments. Thus, not all processesare required in every embodiment. Other process flows are possible.

At operation 710, the processing device determines that data requestedby a set of read operations has been retrieved from a memory componentof a memory sub-system. The data retrieved from the memory component canbe associated with a fill operation that is generated and the data andthe fill operation can be stored in a fill queue.

At block 720, the processing device executes the one or more filloperations to store the data at a cache line of a cache of the memorysub-system. A fill operation can be generated when the data is retrievedfrom the backing store. The fill operation can be stored in the fillqueue with associated data when the fill operation is generated. Thefill operations can be executed in the order that they are stored in thefill queue. Executing the fill operation can include removing the datafrom the fill queue and storing the data at the appropriate cache linein the cache (e.g., read-only cache or the write-read cache). Theprocessing device can decrement a fill counter for each of the one ormore fill operations executed. In response to executing the one or morefill operations to store the data at the cache line, the processingdevice can set a block bit associated with the determined queue to anunblocked state to enable execution of the requests stored at thedetermined queue.

At operation 730, the processing device determines a queue of a set ofqueues that corresponds to the data that has been requested by the setof read operations. Each queue of the set of queues corresponds to arespective cache line of a set of cache lines of a cache of the memorysub-system. The cache can be a read-only cache and/or a write-readcache, and the set of queues can be the read-only outstanding commandqueue and/or the write-read outstanding command queue. Determining thatthe queue corresponds to the data that was requested can includedetermining if the queue is assigned an identifier (e.g., a tag)associated with the data.

At operation 740, in response to executing the one or more filloperations to store the data at the cache line, the processing deviceexecutes the set of read operations stored at the determined queue in anorder in which the set of read operations have been received by thememory sub-system. Using an outstanding command queue for storingrequests enables in-order access to a cache line corresponding to theoutstanding command queue, which can prevent data hazards in the memorysub-system. The requests can be assigned priority indicators by thepriority scheduler, which can be based on the order in which therequests are received by the memory sub-system, as described furtherbelow. The read operations can read the data stored at the cache lineand return the data to the application that sent the request.

FIG. 8 illustrates examples of read-only outstanding command queues 208,write-read outstanding command queues 210, a read-onlycontent-addressable memory 204, and a read-only content-addressablememory 206 in accordance with some embodiments of the presentdisclosure. As depicted, the read-only outstanding command queues 208can include multiple entries and each entry can include fields for atag, a queue counter, a queue for the requests, a read counter and validbit, and a fill counter and valid bit.

The tag field stores the tag obtained from the request received from thehost system. The queue counter can track the number of requests that arestored in the entries in the queue. The queue counter (qc) can beincremented when additional requests are stored in the queue anddecremented when the requests are executed and removed from the queue.The queue for the requests can have any suitable number of entries. Inone example, the number of entries in the queue is equal to the numberof sectors in a cache line of the read-only cache. There can be a blockbit that is set for a request when the request is stored in the queue.

The read counter (R) can track the number of read operations that are tobe performed to obtain the requested data from the backing store. Theread counter can be incremented when the number of read operations aredetermine to retrieve the data from the backing store and can bedecremented when the read operations are performed on the backing storeto obtain the data. The valid bit for the read counter can indicatewhether the data associated with the read is valid or invalid. The fillcounter (F) can track the number of fill operations to execute to storethe requested data in the cache line corresponding to the queue storingthe request. The fill counter can be incremented when the filloperations are generated and decremented when the fill operations areexecuted. The valid bit for the fill counter can indicate whether thedata associated with the fill operation is valid or invalid.

The write-read outstanding command queues 210 can include multipleentries and each entry can include fields for a tag, a queue counter, aqueue for the requests, an evict counter (E) and valid bit, and awrite-back counter (WB) and valid bit. The tag field stores the tagobtained from the request received from the host system. The queuecounter can track the number of requests that are stored in the entriesin the queue. The queue counter can be incremented when additionalrequests are stored in the queue and decremented when the requests areexecuted and removed from the queue. The queue for the requests can haveany suitable number of entries. In one example, the number of entries inthe queue is equal to the number of sectors in a cache line of thewrite-read cache. There can be a block bit that is set for a requestwhen the request is stored in the queue.

The evict counter can track the number of eviction operations that areto be performed to remove data from the write-read cache. The evictcounter can be incremented when data of a cache line is selected to beevicted and decremented when the data in the cache line is evicted fromthe cache. The valid bit for the evict counter can indicate whether thedata associated with the eviction is valid or invalid. The write-backcounter can track the number of write operations to execute to write thedata in a cache line corresponding to the queue to the backing store.The write-back counter can be incremented when write requests are storedin the queue and decremented when the write requests are executed. Thevalid bit for the write-back counter can indicate whether the dataassociated with the write operation is valid or invalid.

The read-only CAM 204 can include multiple entries and each entry caninclude fields for a tag, valid bits for each sector, dirty bits foreach sector, and an address. The tag field stores the tag obtained fromthe request. The valid bit for each sector can be set when the sector ofthe cache line corresponding to the entry stores valid data. The dirtybit for each sector can be set when data is being stored at the sector.The address field can store the address included in the request.

The write-read CAM 206 can include multiple entries and each entry caninclude fields for a tag, valid bits for each sector, dirty bits foreach sector, and an address. The tag field stores the tag obtained fromthe request. The valid bit for each sector can be set when the sector ofthe cache line corresponding to the entry stores valid data. The dirtybit for each sector can be set when data is being stored at the sector.The address field can store the address included in the request.

When a request is received to access (e.g., read or write) data, a tagcan be obtained from an address of data included in the request. Theprocessing device can search the read-only outstanding command queues208, the write-read outstanding command queues 210, the read-only CAM204, and the write-read CAM 206 for a matching tag. If either theread-only CAM 204 or the write-read CAM 206 includes a matching tag,then there is a cache hit and the request can be stored in a hit queueto be executed. For example, for a read request cache hit, the datastored at the cache line corresponding to the entry in the CAM 204 or206 having the matching tag can be returned to the requestingapplication. For a write request cache hit, the data in the request canbe written to the cache line corresponding to the entry in thewrite-read CAM 206 having the matching tag. The dirty bits in thewrite-read CAM 206 for the sectors to which the data are written can beset when the writing commences. The valid bits in the write-read CAM 206for the sectors can be set when the data is written to the sectors.

If the matching tag is not found in the read-only CAM 204 or thewrite-read CAM 206, but is found in the read-only outstanding commandqueues 206, then the request can be stored in an empty entry in theread-only outstanding command queue corresponding to the matching tag.The queue counter can be incremented, the read counter, and the fillcounter can be incremented when the request is stored in the read-onlyoutstanding command queue.

If the matching tag is not found in the read-only CAM 204 or thewrite-read CAM 206, but is found in the write-read outstanding commandqueues 210, then the request can be stored in an empty entry in thewrite-read outstanding command queue corresponding to the matching tag.The queue counter can be incremented and the write-back counter can beincremented when the request is stored in the write-read outstandingcommand queue.

If the matching tag is not found in any of the read-only CAM 204, thewrite-read CAM 206, the read-only outstanding command queues 206, or thewrite-read outstanding command queues 210, then a queue is selected fromthe read-only outstanding command queues 204 or the write-readoutstanding command queues 210 based on the memory access workload usedby the application. If the memory access workload is using sequentialread operations, then the read-only outstanding command queues 208 areselected to be used to store the request. An entry in the read-onlycommand queues 208 that includes valid bits set to the invalid state, isnot assigned a tag, and is not blocked can be selected to store the readrequest. The read request can be stored at a read-only outstandingcommand queue, the tag of the request can be stored in the tag field, ablock bit can be set for the request in the queue, the queue counter canbe incremented, the read counter can be incremented, the fill countercan be incremented, and/or the valid bit can be set for the readcounter.

If the memory access workload is using random write and read operations,then the write-read outstanding command queues 210 are selected to beused to store the request. An entry in the read-only command queues 208that includes valid bits set to the invalid state, is not assigned atag, and is not blocked can be selected to store the write request. Thewrite request can be stored at a write-read outstanding command queue,the tag of the request can be stored in the tag field, a block bit canbe set for the request in the queue, the queue counter can beincremented, the write-back counter can be incremented, and the validbit can be set for the write-back counter.

FIG. 9 is a flow diagram of an example method 900 to determine aschedule to execute requests in a memory sub-system in accordance withsome embodiments of the present disclosure. The method 900 can beperformed by processing logic that can include hardware (e.g.,processing device, circuitry, dedicated logic, programmable logic,microcode, hardware of a device, integrated circuit, etc.), software(e.g., instructions run or executed on a processing device), or acombination thereof. In some embodiments, the method 900 is performed bythe caching component 113 of FIG. 1. Although shown in a particularsequence or order, unless otherwise specified, the order of theprocesses can be modified. Thus, the illustrated embodiments should beunderstood only as examples, and the illustrated processes can beperformed in a different order, and some processes can be performed inparallel. Additionally, one or more processes can be omitted in variousembodiments. Thus, not all processes are required in every embodiment.Other process flows are possible.

At operation 910, the processing device receives a request to read datastored at a memory sub-system. The request to read the data can bereceived from an application executing on the host system. The requestcan include an address of the memory sub-system from which to read thedata.

At operation 920, the processing device determines whether the data isstored at a cache of the memory sub-system. The memory sub-system caninclude a separate read-only cache and a write-read cache. Theprocessing device can determine whether the data is stored at the cacheby obtaining a tag from the address included in the request. Theprocessing device can search a read-only CAM and a write-read CAM todetermine whether a matching tag is included in either CAM. If there isnot a matching tag found, then the processing device determines that thedata is not stored at either the read-only cache or the write-readcache.

The processing device can determine that the tag is also not included inthe read-only outstanding command queue or the write-read outstandingcommand queue by searching both for a matching tag. As described above,the processing device can select a queue from the read-only outstandingcommand queues or the write-read outstanding command queues. Theprocessing device can execute a state machine included in the priorityscheduler or implemented separately to determine the number of requestsneeded to obtain the data based on the size of the cache line in theappropriate cache. The processing device can store the one or morerequests in the selected outstanding command queue that is used to storerequests to read from or write to an address associated with the data.The processing device can determine that a fill operation will be usedfor the read request to store the data obtained from the backing storeto the cache. A priority scheduler can generate priority indicators(e.g., tokens having numerical values) for the read request and the filloperation. The processing device can employ a policy that specifies thatfill operations have priority indicators with higher values to enablethe fill operations to perform before the read requests. The priorityindicators can be generated and assigned to read requests and filloperations in the order in which the read requests are received.

At operation 930, responsive to determining that the data is not storedat the cache of the memory sub-system, the processing device obtains thedata from a memory component of the memory sub-system. The processingdevice can obtain the data from the memory component by storing the readrequest in a priority queue and executing the read request to obtain thedata from the memory component. The fill operation can be generated whenthe data is obtained from the memory component.

At operation 940, the processing device assigns a first priorityindicator (e.g., a token with a value of “1”) to the fill operationassociated with the data that is obtained from the memory component. Thefill operation and the data obtained from the memory component can bestored in a fill queue.

At operation 950, the processing device assigns a second priorityindicator (e.g., a token with a value of “2”) to the request to read thedata. The first priority indicator assigned to the fill operation canhave a higher priority value than the second priority indicator assignedto the request to read the data.

At operation 960, the processing device schedules an order of executingthe fill operation and the request to read the data based on the firstpriority indicator and the second priority indicator. The priorityschedule can use arbitration logic to determine the schedule. If noother requests have been received, the processing device can use theschedule to execute the fill operation to remove the data from the fillqueue and store the data in a cache line corresponding to the queuewhere the read request is stored. Further, the processing device canexecute the read request to read the data in the cache line and returnthe data to the requesting application.

In some embodiments, while the request to read the data is stored in anoutstanding command queue (e.g., read-only or write-read), theprocessing device can receive a second request to read the data storedat the memory sub-system. The processing device can determine whether anidentifier (tag) associated with the second request to read the data isassigned the outstanding command queue. Responsive to determining thatthe identifier associated with the second request to read the data isassigned to the outstanding command queue, the processing device canassign a third priority indicator the second request, and store thesecond request in the outstanding command queue in an entry behind theinitial request to read the data.

In some embodiments, the processing device can receive a third requestto write other data to the address associated with the data at thememory sub-system. The processing device can determine whether anidentifier associated with the third request to write the other data isassigned to the queue. Responsive to determining that the identifierassociated with the third request to write the other data is assigned tothe queue, the processing device can assign a fourth priority indicatorto the third request and store the write request in an entry behind thesecond request. The processing device can determine a schedule ofexecuting the fill operation, the request to read the data, the secondrequest to read the data, and the third request to write the other databased on the first priority indicator, the second priority indicator,the third priority indicator, and the fourth priority indicator. Theschedule can reflect an order in which the request, the second request,and the third request were received in the outstanding command queue. Ifno other requests are received, the schedule can be used to execute thefill operation, the request to read the data, the second request to readthe data, and the third request to write the other data.

In some embodiments, the processing device can receive a second requestto read other data stored at the memory sub-system. The processingdevice can determine whether the other data is stored at the cache ofthe memory sub-system by searching the read-only CAM and the write-readCAM for a tag matching the tag included in the second request. If thedata is not stored at the cache and the processing device determinesthat the matching tag is also not found in the read-only outstandingcommand queue or the write-read outstanding command queue, a secondoutstanding command queue can be selected to store the second request toread the other data. The second outstanding command queue that storesthe second request to read the other data can be different than theoutstanding command queue used to store the request to read the data.Responsive to determining that the other data is not stored at the cacheof the memory sub-system, the processing device can obtain the otherdata from the memory component of the memory sub-system.

The processing device can determine that a second fill operation will beused to store the requested data obtained from the memory component atthe appropriate cache. The processing device can generate a priorityindicator for the second fill operation and the second request to readthe data. The second fill operation can be generated and the thirdpriority indicator can be assigned to the second fill operation. Afourth priority indicator can be generated and assigned to the secondrequest to read the other data. The processing device can determine aschedule of executing the fill operation, the request to read the data,the second fill operation, and the second request to read the other databased at least on the first priority indicator, the second priorityindicator, the third priority indicator, and the fourth priorityindicator.

The processing device can execute, based on the determined schedule, therequest to read the data and the second request to read the other datain a different order than in which the request to read the data and thesecond request to read the other data were received. For example, insome instances, even though the request to obtain the data was sent tothe backing store first, the other data requested by the second requestcan return faster from the backing store. In such an instance, theprocessing device can determine to process the second fill operation forthe other data first and the second request to read the other databefore the fill operation and the request to read the data. The filloperation can store the data in a cache line corresponding to theoutstanding command queue and the second fill operation can store theother data in a second cache line corresponding to the secondoutstanding command queue. The request to read the data can read thedata from the cache line and return the data to an application that sentthe request. The second request to read the data can read the other datafrom the second cache line and return the other data to an applicationthat sent the second request.

In some embodiments, after the fill operation, read requests, and/orwrite requests are executed, the priority indicators can be reused andreassigned to subsequent fill operations, read requests, and/or writerequests. The processing device can set a limit on the number ofpriority indicators generated. The limit can be any suitable number andcan be dynamically configured to enable efficient request throughput.

FIG. 10 is a flow diagram of another example method 1000 to determine aschedule to execute requests in a memory sub-system in accordance withsome embodiments of the present disclosure. The method 1000 can beperformed by processing logic that can include hardware (e.g.,processing device, circuitry, dedicated logic, programmable logic,microcode, hardware of a device, integrated circuit, etc.), software(e.g., instructions run or executed on a processing device), or acombination thereof. In some embodiments, the method 1000 is performedby the caching component 113 of FIG. 1. Although shown in a particularsequence or order, unless otherwise specified, the order of theprocesses can be modified. Thus, the illustrated embodiments should beunderstood only as examples, and the illustrated processes can beperformed in a different order, and some processes can be performed inparallel. Additionally, one or more processes can be omitted in variousembodiments. Thus, not all processes are required in every embodiment.Other process flows are possible.

At operation 1010, the processing device receives a set of requests toaccess data stored at a memory sub-system. The set of requests can bereceived from one or more applications executing on the host system. Therequests can include address at which to access the data. If the dataincluded in the set of requests is not present in either the read-onlycache or the write-read cache, the processing device determines whichone or more outstanding command queues (e.g., read-only or write-read)at which to store the set of requests. If the tag included in theaddresses of the set of requests are the same, then the same outstandingcommand queue can be used to store the set of requests. If the tagsincluded in the addresses of the set of requests are different, thenmore than one outstanding command queue can be used to store the set ofrequests. For example, a separate outstanding command queue can beassigned a respective tag.

At operation 1020, the processing device assigns a set of priorityindicators to the set of requests. The priority indicators can begenerated by the processing device and can include numerical values, forexample. The priority indicators can reflect the order in which the setof requests were received by the memory sub-system. The priorityindicators can be assigned to the set of requests that are stored in theone or more outstanding command queues. In some instances, when therequests are read requests, there can be fill operations generated thatare also assigned priority indicators, as described above.

At operation 1030, the processing device determines an order to executethe set of requests based on the set of priority indicators assigned tothe set of requests to access the data. For example, the order can besequential if the priority indicators are numerical values, such as 1,2, 3, 4, 5, 6, etc. If there are read requests in the set of requests,the processing device can use a state machine to determine a number ofone or more read request for each respect request in the set of requeststo read the data based on a size of the cache line in the cache. Theprocessing device can store the one or more read requests in a priorityqueue based on the order. The processing device can execute the one ormore requests stored in the priority queue to read the data from the oneor more memory components. The processing device can store a filloperation and the data in a fill queue responsive to obtaining the datafrom the one or more memory components. The processing device canperform the fill operation to remove the data from the fill queue andstore the data in a cache line of a cache of the memory sub-system.

At operation 1040, responsive to obtaining the data from one or morememory components of the memory sub-system, the processing deviceexecutes the set of requests based on the determined order. In someembodiments, when there are fill operations stored in the fill queue,the processing device can execute the fill operations prior to executingthe read requests corresponding to the fill operations because thepriority indicators assigned to fill operations can have higher priorityvalues than the priority indicators assigned to the corresponding readrequests.

In some embodiments, a set of second requests to access other datastored at the memory sub-system can be received. The processing devicecan assign a set of second priority indicators to the set of secondrequests. The set of second priority indicators can have higher priorityvalues than the set of priority indicators when the other data isobtained from the one or more memory components before the data isobtained from the one or more memory components. The processing devicecan determine the order to execute the set of requests and the set ofsecond requests based on the set of priority indicators and the set ofsecond priority indicators.

FIG. 11 illustrates an example of using a priority scheduler todetermine a schedule to execute requests based on priority indicators inaccordance with some embodiments of the present disclosure. In thedepicted example, the processing device can determine that the memoryaccess workload for an application includes sequential read requests andthat the read-only cache is to be used for read requests received fromthe application. The processing device can receive a first read requestsfrom the application and search the read-only CAM and the write-read CAMto determine whether the tag of the request is found. If the matchingtag is found in either CAM, then the first read request can be sent tothe hit queue and the first read request can be processed in the orderit is received in the hit queue to return the data to the application.If the matching tag is not found in either CAM, the processing devicecan determine to use the read-only outstanding command queue 208 becausethe application is using sequential read requests type of memory accessworkload.

In the depicted example, the processing device obtained the tag “123”for the first read request and searched the read-only outstandingcommand queues 208 for a matching tag. The processing device did notfind a matching tag and selected entry 1100 to store the first readrequest. The processing device can set a block bit associated with theread-only outstanding command queue in the request field of entry 1100to a value indicating the read-only outstanding command queue is blocked(e.g., no requests in the read-only outstanding command queue can beexecuted while blocked). The processing device can increment the queuecounter to “1”. The processing device assigned tag “123” to the tagfield for the entry 1100. The processing device can determine that afill operation will be generated for the data associated with the firstread request that is returned from the backing store. The priorityscheduler 212 can generate priority indicators for the first readrequest (“2”) and the fill operation (“1”). The value of the priorityindicator for the fill operation corresponding to the first read requestcan have a higher priority to enable storing data obtained from thebacking store in the cache before performing the first read request. Thepriority scheduler 212 can assign the priority indicator “2” to thefirst read request in the outstanding command queue in the requestsfield of the entry 1100. The processing device can also increment theread-from counter to “1” and the fill counter to “1”, as depicted.

The processing device can receive a second read request including a tag“234” and can search the read-only outstanding command queues 208 for amatching tag. The processing device did not find a matching tag in theread-only outstanding command queues 208 and selected entry 1102 tostore the second read request. The processing device can set a block bitassociated with the read-only outstanding command queue in the requestfield of entry 1102 to a value indicating the read-only outstandingcommand queue is blocked (e.g., no requests in the read-only outstandingcommand queue can be executed while blocked). The processing deviceassigned the tag “234” to the tag field in the entry 1102. The priorityscheduler 212 can determine that a fill operation will be generated forthe data associated with the second read request that is returned fromthe backing store. The priority scheduler 212 can generate priorityindicators for the second read request (“4”) and the fill operation(“3”). The priority scheduler 212 can assign the priority indicator(“4”) to the second read request in the outstanding command queue in therequests field of the entry 1102.

The processing device can receive a third read request including the tag“123” and can search the read-only outstanding command queues 208 for amatching tag. The processing device found the matching tag “123” in theentry 1100. As such, the processing device can store the third readrequest in the read-only outstanding command queue in the request fieldof the entry 1100. The processing device can increment the queue counterto “2”, as depicted. The priority scheduler 212 can determine that afill operation is already going to be generated for the data associatedwith the second read request having the tag “123” so another filloperation does not need to be generated and assigned a priorityindicator. The priority scheduler 212 can generate a priority indicatorfor just the third read request (“5”) and can assign the priorityindicator “5” to the third read request in the outstanding command queuein the requests field of the entry 1100.

The priority scheduler 212 can use the priority queue 220 to store theread requests and execute the read requests in the order in which theread requests are stored to obtain data from the backing store. Asdepicted, the first read request assigned priority indicator “2” isstored in the priority queue 220 first and the second read requestassigned priority indicator “4” is stored in the priority queue 220second because its priority indicator has a lesser priority value thanthe first read request. Further, the third read request may not bestored in the priority queue 220 because the first read request havingthe same tag can obtain the data from the backing store at the addresscorresponding to the same tag.

The processing device can perform the first read request to obtain thedata corresponding to the tag “123” from the backing store. Afterperforming the first read request, the processing device can decrementthe read-from counter to “0” in the entry 1100. A first fill operationfor the data obtained from the first read request can be generated andstored in the fill queue 214 with the data obtained from the backingstore. The priority scheduler 212 can assign the priority indicator “1”to the first fill operation corresponding to the first read request.

The processing device can perform the second read request to obtain thedata corresponding to the tag “234” from the backing store. Afterperforming the second read request, the processing device can decrementthe read-from counter to “0” in the entry 1102. A second fill operationfor the data obtained from the second read request can be generated andstored in the fill queue 214 with the data obtained from the backingstore. The priority scheduler 212 can assign the priority indicator “3”to the second fill operation corresponding to the second read request.

The priority scheduler 212 can determine a schedule for executing theread requests and the fill operations based on the priority indicatorsassigned to the read requests and the fill operations. The schedule canbe sequential based on the numerical values. In one example, theschedule is execute the first fill operation having priority indicator“1”, the first read request having priority indicator “2”, the secondfill operation having priority indicator “3”, the second read requesthaving priority indicator “4”, and the third read request havingpriority indicator “5”.

The processing device can perform the first fill operation by removingthe data from the fill queue 214 and storing the data to a cache linecorresponding to the tag “123” in the read-only cache. The processingdevice can decrement the fill counter to “0” in entry 1100. The priorityscheduler 212 can obtain the priority indicator “1” and reuse it forsubsequent read requests and/or fill operations. The processing devicecan unblock the read-only outstanding command queue by setting a valueof a block bit associated with the read-only outstanding command queueto a value indicating an unblocked state. The processing device canexecute the first read request having the next priority indicator “2”while the outstanding command queue in the entry 1100 is unblocked toreturn the data from the cache line corresponding to tag “123” to theapplication that sent the first read request. The processing device candecrement the queue counter to “1”. The priority scheduler 212 canobtain the priority indicator “2” and reuse it for subsequent readrequests and/or fill operations.

The processing device can search for the read request or the filloperation having the next priority indicator (e.g., “3”) and candetermine that the second fill operation is assigned the next priorityindicator. The second fill operation can be assigned the next priorityinstead of the third read request because the second read requestassociated with the second fill operation was received before the thirdread request. The processing device can set the block bit correspondingto the read-only outstanding command queue to a value indicating ablocked state to prevent the third read request from executing.

The processing device can perform the second fill operation by removingthe data from the fill queue 214 and storing the data to a cache linecorresponding to the tag “234” in the read-only cache. The processingdevice can decrement the fill counter in the entry 1102. The priorityscheduler 212 can obtain the priority indicator “3” and reuse it forsubsequent read requests and/or fill operations. The processing devicecan unblock the read-only outstanding command queue by setting a valueof a block bit associated with the read-only outstanding command queueto a value indicating an unblocked state. The processing device canexecute the second read request having the next priority indicator “4”while the outstanding command queue in the entry 1100 is unblocked toreturn the data at the cache line corresponding to the tag “234” to theapplication that sent the second read request. The priority scheduler212 can obtain the priority indicator “4” and reuse it for subsequentread requests and/or fill operations. The queue counter of entry 1102can be decremented to “0” after the second read request is performed.

The processing device can search for the next priority indicator “5”,which is assigned to the third read request. The processing device canset the block bit associated with the outstanding command queue of entry1100 to an unblocked state. The processing device can execute the thirdread request while the outstanding command queue of entry 1100 isunblocked to return data at the cache line corresponding to tag “123” tothe application that sent the third request. The priority scheduler 212can obtain the priority indicator “5” and reuse it for subsequent readrequests and/or fill operations. The queue counter of entry 1100 can bedecremented to “0” after the third read request is performed.

As can be appreciated, the requests can be performed out-of-orderbetween outstanding command queues that correspond to different cachelines. For example, the first read request having priority indicator “2”was performed in the queue of entry 1100, the second read request havingpriority indicator “4” was performed in the queue of entry 1102, andthen the third read request having priority indicator “5” was performedin the queue of entry 1100. This can provide the benefit of improvedquality of service so applications do not have to wait on other requeststo complete execution before receiving requested data if the requesteddata is available. Also, the requests can be performed in-order based onwhen the requests are received for the same cache line. As depicted, thethird request was received after the first request to read data from thecache line corresponding to the same tag and the third request is storedafter the first request in the queue. Using a first-in, first-outoutstanding command queue can ensure the requests are processed in theorder in which they are received.

FIG. 12 illustrates an example machine of a computer system 1200 withinwhich a set of instructions, for causing the machine to perform any oneor more of the methodologies discussed herein, can be executed. In someembodiments, the computer system 1200 can correspond to a host system(e.g., the host system 120 of FIG. 1) that includes, is coupled to, orutilizes a memory sub-system (e.g., the memory sub-system 110 of FIG. 1)or can be used to perform the operations of a controller (e.g., toexecute an operating system to perform operations corresponding to thecaching component 113 of FIG. 1). In alternative embodiments, themachine can be connected (e.g., networked) to other machines in a LAN,an intranet, an extranet, and/or the Internet. The machine can operatein the capacity of a server or a client machine in client-server networkenvironment, as a peer machine in a peer-to-peer (or distributed)network environment, or as a server or a client machine in a cloudcomputing infrastructure or environment.

The machine can be a personal computer (PC), a tablet PC, a set-top box(STB), a Personal Digital Assistant (PDA), a cellular telephone, a webappliance, a server, a network router, a switch or bridge, or anymachine capable of executing a set of instructions (sequential orotherwise) that specify actions to be taken by that machine. Further,while a single machine is illustrated, the term “machine” shall also betaken to include any collection of machines that individually or jointlyexecute a set (or multiple sets) of instructions to perform any one ormore of the methodologies discussed herein.

The example computer system 1200 includes a processing device 1202, amain memory 1204 (e.g., read-only memory (ROM), flash memory, dynamicrandom access memory (DRAM) such as synchronous DRAM (SDRAM) or RambusDRAM (RDRAM), etc.), a static memory 1206 (e.g., flash memory, staticrandom access memory (SRAM), etc.), and a data storage system 1218,which communicate with each other via a bus 1230.

Processing device 1202 represents one or more general-purpose processingdevices such as a microprocessor, a central processing unit, or thelike. More particularly, the processing device can be a complexinstruction set computing (CISC) microprocessor, reduced instruction setcomputing (RISC) microprocessor, very long instruction word (VLIW)microprocessor, or a processor implementing other instruction sets, orprocessors implementing a combination of instruction sets. Processingdevice 1202 can also be one or more special-purpose processing devicessuch as an application specific integrated circuit (ASIC), a fieldprogrammable gate array (FPGA), a digital signal processor (DSP),network processor, or the like. The processing device 1202 is configuredto execute instructions 1226 for performing the operations and stepsdiscussed herein. The computer system 1200 can further include a networkinterface device 1208 to communicate over the network 1220.

The data storage system 1218 can include a machine-readable storagemedium 1224 (also known as a computer-readable medium) on which isstored one or more sets of instructions 1226 or software embodying anyone or more of the methodologies or functions described herein. Theinstructions 1226 can also reside, completely or at least partially,within the main memory 1204 and/or within the processing device 1202during execution thereof by the computer system 1200, the main memory1204 and the processing device 1202 also constituting machine-readablestorage media. The machine-readable storage medium 1224, data storagesystem 1218, and/or main memory 1204 can correspond to the memorysub-system 110 of FIG. 1.

In one embodiment, the instructions 1226 include instructions toimplement functionality corresponding to a caching component (e.g., thecaching component 113 of FIG. 1). While the machine-readable storagemedium 1224 is shown in an example embodiment to be a single medium, theterm “machine-readable storage medium” should be taken to include asingle medium or multiple media that store the one or more sets ofinstructions. The term “machine-readable storage medium” shall also betaken to include any medium that is capable of storing or encoding a setof instructions for execution by the machine and that cause the machineto perform any one or more of the methodologies of the presentdisclosure. The term “machine-readable storage medium” shall accordinglybe taken to include, but not be limited to, solid-state memories,optical media, and magnetic media.

Some portions of the preceding detailed descriptions have been presentedin terms of algorithms and symbolic representations of operations ondata bits within a computer memory. These algorithmic descriptions andrepresentations are the ways used by those skilled in the dataprocessing arts to most effectively convey the substance of their workto others skilled in the art. An algorithm is here, and generally,conceived to be a self-consistent sequence of operations leading to adesired result. The operations are those requiring physicalmanipulations of physical quantities. Usually, though not necessarily,these quantities take the form of electrical or magnetic signals capableof being stored, combined, compared, and otherwise manipulated. It hasproven convenient at times, principally for reasons of common usage, torefer to these signals as bits, values, elements, symbols, characters,terms, numbers, or the like.

It should be borne in mind, however, that all of these and similar termsare to be associated with the appropriate physical quantities and aremerely convenient labels applied to these quantities. The presentdisclosure can refer to the action and processes of a computer system,or similar electronic computing device, that manipulates and transformsdata represented as physical (electronic) quantities within the computersystem's registers and memories into other data similarly represented asphysical quantities within the computer system memories or registers orother such information storage systems.

The present disclosure also relates to an apparatus for performing theoperations herein. This apparatus can be specially constructed for theintended purposes, or it can include a general purpose computerselectively activated or reconfigured by a computer program stored inthe computer. Such a computer program can be stored in a computerreadable storage medium, such as, but not limited to, any type of diskincluding floppy disks, optical disks, CD-ROMs, and magnetic-opticaldisks, read-only memories (ROMs), random access memories (RAMs), EPROMs,EEPROMs, magnetic or optical cards, or any type of media suitable forstoring electronic instructions, each coupled to a computer system bus.

The algorithms and displays presented herein are not inherently relatedto any particular computer or other apparatus. Various general purposesystems can be used with programs in accordance with the teachingsherein, or it can prove convenient to construct a more specializedapparatus to perform the method. The structure for a variety of thesesystems will appear as set forth in the description below. In addition,the present disclosure is not described with reference to any particularprogramming language. It will be appreciated that a variety ofprogramming languages can be used to implement the teachings of thedisclosure as described herein.

The present disclosure can be provided as a computer program product, orsoftware, that can include a machine-readable medium having storedthereon instructions, which can be used to program a computer system (orother electronic devices) to perform a process according to the presentdisclosure. A machine-readable medium includes any mechanism for storinginformation in a form readable by a machine (e.g., a computer). In someembodiments, a machine-readable (e.g., computer-readable) mediumincludes a machine (e.g., a computer) readable storage medium such as aread only memory (“ROM”), random access memory (“RAM”), magnetic diskstorage media, optical storage media, flash memory components, etc.

In the foregoing specification, embodiments of the disclosure have beendescribed with reference to specific example embodiments thereof. Itwill be evident that various modifications can be made thereto withoutdeparting from the broader spirit and scope of embodiments of thedisclosure as set forth in the following claims. The specification anddrawings are, accordingly, to be regarded in an illustrative senserather than a restrictive sense.

What is claimed is:
 1. A method comprising: determining a memory accessworkload for an application; determining whether the memory accessworkload for the application is associated with at least one of (a)sequential read operations comprising a plurality of read requestsreceived in order and directed to at least one of a same memory addressor sequential memory addresses, or (b) write and read operations;responsive to the memory access workload, retrieving data associatedwith the application from a backing store; and storing the dataassociated with the application and retrieved from the backing store inat least one of a cache of a first type or a cache of second type basedon the determination of the memory access workload, wherein storing thedata comprises at least one of: storing, by a processing device, thedata associated with the application and retrieved from the backingstore at the cache of the first type based on the determination that thememory workload for the application is associated with sequential readoperations; or storing, by the processing device, the data associatedwith the application and retrieved from the backing store at the cacheof the second type based on the determination that the memory workloadfor the application is associated with write and read operations.
 2. Themethod of claim 1, further comprising storing the data associated withthe application at the cache of the first type in response to the memoryaccess workload being associated with sequential read operations,wherein the first type is read- only.
 3. The method of claim 1, furthercomprising storing the data associated with the application at the cacheof the second type in response to the memory access workload beingassociated with write and read operations, wherein the second type iswrite-read.
 4. The method of claim 1, wherein determining the memoryaccess workload for the application comprises: receiving a plurality ofmemory access requests from the application; determining a pattern basedon the plurality of memory access requests; and determining the memoryaccess workload for the application based on the pattern.
 5. The methodof claim 1, further comprising: receiving the data associated with theapplication in one or more write requests to write the data to a memorycomponent, wherein the one or more write requests have a fixed datasize.
 6. The method of claim 5, further comprising: storing the dataassociated with the application at one or more sectors of a cache lineof the cache of the second type to accumulate the data in the cache linein response to determining that memory access workload for theapplication is associated with write and read operations, wherein eachof the one or more sectors have the fixed data size.
 7. The method ofclaim 6, further comprising determining when a cumulative data size ofthe one or more sectors storing the data associated with the applicationsatisfies a threshold condition; and responsive to determining that thecumulative data size of the one or more sectors storing the dataassociated with the application satisfies the threshold condition,transmitting a request to store the data at the memory component.
 8. Themethod of claim 1, further comprising: receiving a command to preloadthe cache of the first type or the cache of the second type with thedata associated with the application; and loading the cache of the firsttype or the cache of the second type with the data associated with theapplication prior to a request to access the data being received fromthe application.
 9. A system comprising: a memory device; and aprocessing device, operatively coupled with the memory device, to:determine a memory access workload for an application; determine whetherthe memory access workload for the application is associated with atleast one of (a) sequential read operations comprising a plurality ofread requests received in order and directed to at least one of a samememory address or sequential memory addresses, or (b) write and readoperations; responsive to the memory access workload, retrieve dataassociated with the application from a backing store of the memorydevice; and storing the data associated with the application andretrieved from the backing store in at least one of a cache of a firsttype or a cache of second type based on the determination of the memoryaccess workload, wherein storing the data comprises at least one of:store the data associated with the application and retrieved from thebacking store at the cache of the first type based on the determinationthat the memory workload for the application is associated withsequential read operations; or store the data associated with theapplication and retrieved from the backing store at the cache of thesecond type based on the determination that the memory workload for theapplication is associated with write and read operations.
 10. The systemof claim 9, wherein the processing device is further to store the dataassociated with the application at the cache of the first type inresponse to the memory access workload being associated with sequentialread operations, wherein the first type is read-only.
 11. The system ofclaim 9, wherein the processing device is further to store the dataassociated with the application at the cache of the second type inresponse to the memory access workload being associated with write andread operations, wherein the second type is write-read.
 12. The systemof claim 9, wherein to determine the memory access workload for theapplication, the processing device is further to: receive a plurality ofmemory access requests from the application; determine a pattern basedon the plurality of memory access requests; and determine the memoryaccess workload for the application based on the pattern.
 13. The systemof claim 9, wherein the processing device is further to: receive thedata associated with the application in one or more write requests towrite the data to a memory component, wherein the one or more writerequests have a fixed data size.
 14. The system of claim 13, wherein theprocessing device is further to: store the data associated with theapplication at one or more sectors of a cache line of the cache of thesecond type to accumulate the data in the cache line based on adetermination of whether the memory workload for the application isassociated with write and read operations, wherein each of the one ormore sectors have the fixed data size; determine when a cumulative datasize of the one or more sectors storing the data associated with theapplication satisfies a threshold condition; and responsive todetermining that the cumulative data size of the one or more sectorsstoring the data associated with the application satisfies the thresholdcondition, transmit a request to store the data at the memory component.15. A non-transitory machine-readable medium storing instructions that,when executed by a processing device, cause the processing device to:receive a plurality of requests to access data at a memory component,wherein each of the plurality of requests specifies a fixed size ofdata; store data of each of the plurality of requests into a respectivesector of a plurality of sectors of a cache line of a cache toaccumulate the data in the cache line, wherein each respective sector ofthe plurality of sectors of the cache line stores the data at the fixedsize; determine whether a cumulative data size of the plurality ofsectors storing the data of the plurality of requests satisfies athreshold condition pertaining to the cumulative data size, wherein thethreshold condition is based at least in part on a size of a segment ofthe memory component; and responsive to determining that the cumulativedata size of the plurality of sectors of the cache line storing the datasatisfies the threshold condition, transmit a request to store the dataat the memory component.
 16. The non-transitory machine-readable mediumof claim 15, wherein the fixed size of data is specified by a protocolused by a host system to interface with a memory sub-system comprisingthe memory component.
 17. The non-transitory machine-readable medium ofclaim 15, wherein the threshold condition corresponds to the cumulativedata size satisfying a data size parameter specified for accessing thememory component.
 18. The non-transitory machine-readable media of claim15, wherein the processing device is further to: receive a command topreload the cache with other data associated with an application; andwrite the other data associated with the application to the cache priorto receiving the plurality of requests to access the data at the memorycomponent.